﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Xml.Serialization;

namespace FlickrSL.Data
{
    [XmlType("size")]
    public class Size
    {
        [XmlIgnore]
        public SizeType Type { get; set; }

        [XmlAttribute("label")]
        public String TypeString
        {
            get { return this.Type.ToString(); }
            set { this.Type = (SizeType)Enum.Parse(typeof(SizeType), value, true); }
        }

        [XmlAttribute("width")]
        public Int32 Width { get; set; }

        [XmlAttribute("height")]
        public Int32 Height { get; set; }

        [XmlAttribute("source")]
        public String Source { get; set; }

        [XmlAttribute("url")]
        public String Url { get; set; }
    }

    public enum SizeType
    {
        Square,
        Thumbnail,
        Small,
        Medium,
        Large,
        Original
    }
}
